<?php

//simplifies our life.
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', dirname(dirname(__FILE__)));
define('LIB_PATH', ROOT . DS . 'lib' .DS . 'smvc' );
define('APP_PATH', ROOT . DS . 'app');

$url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

// validate a SEO friendly URL

if(filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_QUERY_REQUIRED) === false)
{
   require_once(LIB_PATH . DS . 'bootstrap.php');
}
else
{
    throw new Exception('Invalid URL');
}